package com.cip.master.service.impl;

import java.util.List;

import com.cip.master.dao.ResultDAO;
import com.cip.master.model.Result;
import com.cip.master.service.ResultService;

public class ResultServiceImpl implements ResultService {
	
	private ResultDAO resultDAO;

	public List<Result> getAllResults() throws Exception {
		return resultDAO.getAllResults();
	}
	
	public List<Result> getResultsBySearch(String academicYear, String classYear,
			String sectionName, String examName) throws Exception{
		return resultDAO.getResultsBySearch(academicYear, classYear, sectionName, examName);
	}
	
	public Result saveOrUpdateResult(Result result) throws Exception{
		return resultDAO.saveOrUpdateResult(result);
	}
	
	public List<Result> getResultsByCandidate(String academicYear, String classYear,String sectionName, String examName,String studentId) throws Exception{
		return resultDAO.getResultsByCandidate(academicYear, classYear,sectionName,  examName, studentId);
	}

	public ResultDAO getResultDAO() {
		return resultDAO;
	}

	public void setResultDAO(ResultDAO resultDAO) {
		this.resultDAO = resultDAO;
	}
	
}
